var vm = Vue.prototype;
var app = new Vue({
  el: '#app',
  data: {
    steps: 2, // 1 信息填写， 2 平台审核 ， 3 成功入驻
    name: '',
    username: '',
    goodField: '',
    idcard: '',
    phone: '',
    qq: '',
    provinces:areaList.province_list,
    province:'',
    city:'',
    county:'',
    addressdetail: '',
    introduce: ''
  },
  created(){
     
  },
  computed:{
      cityies(){
           if(!this.province) return {};
           var list = areaList.city_list;
           var code = this.province.code.substring(0,2);
           var res = {};
           for(key in list){
               var keycode = key.substring(0,2);
               if(keycode == code){
                   res[key] = list[key];
               }
           }
           return res;
      },
      counties(){
           if(!this.city) return {};
           var list = areaList.county_list;
           var code = this.city.code.substring(0,4);
           var res = {};
           for(key in list){
               var keycode = key.substring(0,4);
               if(keycode == code){
                   res[key] = list[key];
               }
           }
           return res;
      }
  },
  methods:{
      changeProvince(){
          this.city='';
          this.county='';
      },
      changeCity(){
          this.county='';
      },
      uploadUserInfo() {
          console.log('submit')
      }
  }
});
